class Solution {
public:
    string numStr[10] = { "","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz" };
    void combine(const string digits, size_t i, vector<string>& vcombine, string strCombine)
    {
        if (i == digits.size())
        {
            vcombine.push_back(strCombine);
            return;
        }
        int num = digits[i] - '0';

        string str = numStr[num];

        for (auto e : str)
        {
            combine(digits, i + 1, vcombine, strCombine + e);
        }
    }
    vector<string> letterCombinations(string digits) {
        size_t i = 0;
        vector<string> vcombine;
        string strCombine;
        if (digits.empty())
        {
            return vcombine;
        }
        combine(digits, i, vcombine, strCombine);

        return vcombine;
    }
};